Content adaptive deblocking during video encoding and decoding

ABSTRACT

Disclosed herein are exemplary embodiments of methods, apparatus, and systems for performing content-adaptive deblocking to improve the visual quality of video images compressed using block-based motion-predictive video coding. For instance, in certain embodiments of the disclosed technology, edge information is obtained using global orientation energy edge detection (“OEED”) techniques on an initially deblocked image. OEED detection can provide a robust partition of local directional features (“LDFs”). For a local directional feature detected in the partition, a directional deblocking filter having an orientation corresponding to the orientation of the LDF can be used. The selected filter can have a filter orientation and activation thresholds that better preserve image details while reducing blocking artifacts. In certain embodiments, for a consecutive non-LDF region, extra smoothing can be imposed to suppress the visually severe blocking artifacts.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.12/924,836, filed Oct. 5, 2010, which is hereby incorporated byreference.

FIELD

This application relates to deblocking schemes applied duringblock-based motion-predictive video encoding or decoding.

BACKGROUND

Block-based motion-predictive video coding is one of the most commonlyused techniques for video compression. Standards such as MPEG-2, MPEG-4,Windows Media Video (“WMV”) versions 7/8/9, VC-1, and H.264, are basedon block-based motion-video predictive coding techniques. These videocompression techniques typically encode individual frames of video usingintraframe compression or interframe compression. Intraframe compressiontechniques compress an individual frame without reference to video datafrom other frames. Such frames are typically referred to as “I-frames”or “key frames.” Interframe compression techniques compress frames withreference to preceding frames or with reference to both preceding andsubsequent frames. Frames compressed with reference to preceding framesare typically referred to as “predicted frames” or “P-frames,” whereasframes compressed with reference to both preceding and subsequent framesare referred to as “B-frames” or “bidirectionally predicted frames.”

The common detriment of block-based techniques is the creation ofartificial illusory boundaries, or contours, between blocks in thedecompressed video. These contours are referred to as “block artifacts,”“blocking artifacts,” or “blockiness.” Blockiness is generally worsewhen the video bit rate is lower and is highly undesirable.

Many techniques have been proposed to reduce block artifacts, includingoverlapped motion compensation, wavelets, large-support transforms, anddeblocking filters. Of these, only deblocking filters have been found tobe useful and effective for practical and commercial video encoders. Adeblocking filter in video coding is a filter that smoothes out blockboundaries in a decompressed video frame using a set of rules that isimplicitly derived from data known to the decoder. In other words,deblocking filters generally require no additional information to besent in or with the compressed video stream.

Furthermore, deblocking filters are sometimes used selectively or variedin strength depending on the particular use. For example, the strengthof the deblocking filter used in the H.264/AVC standard is adjustedbased on the block types (intra or inter) and on whether the blockscontain coded coefficients. Furthermore, the H.264/AVC deblocking filteris disabled for a block when the intensity difference between boundarypixels in two adjacent blocks indicates that there is a significantchange across the block boundary. Such a significant change indicatesthat the block edge is more likely to be an original image featurerather than a blocking distortion caused by a block artifact. For theH.264/AVC filter, the thresholds defining whether a significant changeis present depend on the quantization parameter (“QP”).

Although the deblocking scheme described in the H.264/AVC standard helpsreduce some blocking artifacts, the scheme suffers from a number ofdisadvantages. First, deblocking is always performed along the directionperpendicular to the block boundary (either horizontally or vertically),without any consideration for local features inside the block. Such ascheme is therefore not equipped to account for and properly filterimage edges that are oriented in non-horizontal and non-verticalorientations, which can be the large majority of edges in an image.Further, the same filter orientation and thresholds are applied tohighly different image content, which can potentially degrade thedeblocking performance.

Additionally, large smooth regions in video images can be the source forsignificant blocking artifacts. In particular, for high resolutionvideos compressed at a low bit-rate, the most visually annoyingartifacts sometimes appear in a large smooth region that has only asmall color or intensity variation across the region. Although theblocking degradation in such regions is reduced to a certain extentusing standard deblocking schemes (such as the H.264/AVC deblockingscheme), significant blockiness still visibly exists spatially andtemporally. This blocking is often highly apparent and can heavilyimpair the perceptual experience of the audience.

SUMMARY

Disclosed below are representative embodiments of methods, apparatus,and systems for performing content-adaptive deblocking to improve thevisual quality of video images compressed using block-basedmotion-predictive video coding. For example, in certain embodiments ofthe disclosed technology, edge information is obtained using globalorientation energy edge detection (“OEED”) techniques on an initiallydeblocked image. OEED detection can provide a robust partition of localdirectional features (“LDFs”). For a local directional feature detectedin the partition, a directional deblocking filter having an orientationcorresponding to the orientation of the LDF can be used. The selectedfilter can have a filter orientation and activation thresholds thatbetter preserve image details while reducing blocking artifacts. Incertain embodiments, for a consecutive non-LDF region, extra smoothingcan be imposed to suppress the visually severe blocking artifacts.Experimental results presented herein demonstrate that embodiments ofthe disclosed technology can effectively improve the visual qualitywhile maintaining the objective fidelity of videos compressed usingblock-based motion-predictive video coding.

Some of the exemplary methods disclosed herein comprise, for example,buffering a video frame reconstructed during block-basedmotion-predictive encoding or decoding; determining edge locations andedge orientations throughout one or more blocks in the video frame; fora selected block of the one or more blocks in the video frame, selectinga deblocking filter from two or more candidate deblocking filters basedat least in part on the edge orientations in the selected block; andapplying the selected deblocking filter to the selected block and one ormore blocks neighboring the selected block. In certain implementations,the determining the edge locations and the edge orientations comprisespartitioning the blocks of the video frame into blocks having localdirectional features and blocks having no local directional featuresusing orientation energy edge detection. In some implementations, thedetermining the edge locations and the edge orientations comprisesapplying two or more orientation energy filters, at least one of theorientation energy filters being in a non-vertical and non-horizontalorientation. In certain implementations, the determining the edgelocations and the edge orientations comprises applying sets of one ormore Gaussian derivative filters, each set of the one or more Gaussianderivative filters having Gaussian derivative filters at an orientationdifferent from the Gaussian derivative filters of the other sets. Insome implementations, the sets of one or more Gaussian derivativefilters comprise a first Gaussian derivative filter and a secondGaussian derivative filter. For example, in one particularimplementation, eight sets of one or more Gaussian derivative filtersare applied, six of the eight sets being at a non-horizontal andnon-vertical orientation. In certain implementations, the method furthercomprises applying a deblocking filter to luminance values of the videoimage before the edge locations and the edge orientations aredetermined. In some implementations, the method is performed in a motionestimation/compensation loop of an encoder or in a motion compensationloop of a decoder. In certain implementations, the act of selecting adeblocking filter comprises determining whether the selected block hasdirectional features that are consistent with directional features ofthe one or more blocks neighboring the selected block. For example, thedetermination of whether the selected block has directional featuresthat are consistent with the directional features of the one or moreblocks neighboring the selected block can be based at least in part onone or more of an average orientation of edge pixels and an orientationvariance of the edge pixels.

Certain exemplary methods disclosed herein comprise, for example,buffering a video frame reconstructed during block-basedmotion-predictive encoding or decoding; for a selected block in thevideo frame, determining whether the selected block is in a region withno local directional features; selecting one of a plurality of filtersto apply to the selected block based at least in part on thedetermination of whether the selected block is in a region with no localdirectional features; and applying the selected filter to the selectedblock. In certain implementations, the region with no local directionalfeatures comprises the selected block and one or more adjacent blocks tothe selected block. In some implementations, the selecting comprisesselecting a smoothing filter when the selected block is determined to bein a region with no local directional features. In certainimplementations, the determining whether the selected block is in aregion with no local directional features comprises determining whethera sum of intensity variations in the selected block and in one or moreadjacent blocks satisfy a threshold value. In some implementations, thedetermining whether the selected block is in a region with no localdirectional features further comprises partitioning the decoded imageinto blocks having local directional features and blocks having no localdirectional features using an edge detection filter and determining thatthe selected block has no local directional features based at least inpart on the partitioning. In certain implementations, the method isperformed in a motion estimation/compensation loop of an encoder or in amotion estimation loop of a decoder.

Some of the exemplary methods disclosed herein comprise, for example,detecting edge locations and edge orientations in a video image; for ablock of the video image having a detected edge, selecting a directionaldeblocking filter having a non-horizontal and non-vertical orientation;evaluating one or more application thresholds for the selecteddirectional deblocking filter; if the application thresholds for thedirectional deblocking filter are satisfied, applying the directionaldeblocking filter across a boundary of the block and at least oneadjacent block; and if the application thresholds for the directionaldeblocking filter are not satisfied, applying no deblocking filter tothe block. In certain implementations, the edge orientations aredetected by applying two or more orientation energy filters to the videoimage. In some implementations, at least one of the applicationthresholds for the selected directional deblocking filter is dependenton the orientation of the selected directional deblocking filter. Incertain implementations, the block is a first block, and the methodfurther comprises, for a second block of the video image having nodetected edge, determining that the second block has one or moreadjacent blocks that also have no detected edge; and applying asmoothing filter to pixels in the second block and the one or moreadjacent blocks.

Embodiments of the disclosed methods can be performed using computingdevices, such as a computer processor or an integrated circuit. Forexample, embodiments of the disclosed methods can be performed bysoftware stored on one or more non-transitory computer-readable media(e.g., one or more optical media discs, volatile memory components (suchas DRAM or SRAM), or nonvolatile memory or storage components (such ashard drives)). Such software can be executed on a single computer or ona networked computer (e.g., via the Internet, a wide-area network, alocal-area network, a client-server network, or other such network).Embodiments of the disclosed methods can also be performed byspecialized computing devices (e.g., one or more application specificintegrated circuits (“ASICs”), graphic processing units (“GPUs”), orprogrammable logic devices (such as field programmable gate arrays(“FPGAs”)) configured to perform any of the disclosed methods).Additionally, any intermediate or final result created or modified usingany of the disclosed methods can be stored on one or more non-transitorystorage medium (e.g., one or more optical media discs, volatile memoryor storage components (such as DRAM or SRAM), or nonvolatile memory orstorage components (such as hard drives)). Furthermore, any of thesoftware embodiments (comprising, for example, computer-executableinstructions for causing a computer to perform any of the disclosedmethods), intermediate results, or final results created or modified bythe disclosed methods can be transmitted, received, or accessed througha suitable communication means.

The foregoing and other objects, features, and advantages of theinvention will become more apparent from the following detaileddescription, which proceeds with reference to the accompanying figures.

BRIEF DESCRIPTION OF THE DRAWINGS

The patent or application file contains at least one drawing executed incolor. Copies of this patent or patent application publication withcolor drawing(s) will be provided by the Office upon request and paymentof the necessary fee.

FIG. 1 is a schematic block diagram of an exemplary computingenvironment in which embodiments of the disclosed technology can beimplemented.

FIG. 2 is a schematic block diagram of a generalized encoder in whichembodiments of the disclosed deblocking techniques can be used.

FIG. 3 is a schematic block diagram of a generalized decoder in whichembodiments of the disclosed deblocking techniques can be used.

FIG. 4 is a schematic block diagram of a motion estimation/compensationloop in an encoder in which embodiments of the disclosed deblockingtechniques can be used.

FIG. 5 is a schematic block diagram of a motion compensation loop in adecoder in which embodiments of the disclosed deblocking techniques canbe used.

FIG. 6 is a schematic block diagram of a general exemplary embodiment ofa deblocking process according to the disclosed technology.

FIG. 7 is a flowchart of a more specific embodiment of a deblockingprocess according to the disclosed technology.

FIG. 8 is a diagram showing eight orientation energy edge detection(“OEED”) filters as can be used with embodiments of the disclosedtechnology.

FIG. 9 shows an exemplary reconstructed image that may be input intoembodiments of the disclosed deblocking processes, such as thedeblocking process of FIG. 7.

FIG. 10 shows an exemplary local directional feature (“LDF”) partitionof the image of FIG. 9 obtained using an embodiment of the disclosedOEED techniques.

FIG. 11 shows an exemplary edge map of the image of FIG. 9 obtainedusing an embodiment of the disclosed OEED techniques.

FIG. 12 shows an exemplary angle map of the image of FIG. 9 obtainedusing an embodiment of the disclosed OEED techniques.

FIG. 13 shows an exemplary image highlighting non-LDF regions detectedby an embodiment of the disclosed non-LDF region detection techniques.

FIG. 14 is a schematic block diagram illustrating six exemplarydirectional deblocking filters that can be used with embodiments of thedisclosed technology.

FIG. 15 is a graph showing a relationship between a magnificationparameter A and a quantization parameter QP for determining thresholdsin embodiments of the disclosed directional deblocking filters.

FIG. 16 is a schematic block diagram illustrating an exemplary extrasmoothing filter as can be used in embodiments of the disclosedtechnology.

FIGS. 17-19 show multiples images highlighting the improved performanceof an exemplary embodiment of the disclosed deblocking processescompared to a conventional deblocking process.

FIG. 20 shows a table with experimental results obtained when testing anembodiment of the disclosed deblocking processes.

FIG. 21 shows an exemplary LDF partition of the image of FIG. 9 obtainedusing an intra prediction technique.

DETAILED DESCRIPTION I. General Considerations

Disclosed below are representative embodiments of methods, apparatus,and systems for performing content-adaptive deblocking to improve thevisual quality of video images compressed using block-basedmotion-predictive video coding. The disclosed methods, apparatus, andsystems should not be construed as limiting in any way. Instead, thepresent disclosure is directed toward all novel and nonobvious featuresand aspects of the various disclosed embodiments, alone and in variouscombinations and subcombinations with one another. Furthermore, anyfeatures or aspects of the disclosed embodiments can be used in variouscombinations and subcombinations with one another. The disclosedmethods, apparatus, and systems are not limited to any specific aspector feature or combination thereof, nor do the disclosed embodimentsrequire that any one or more specific advantages be present or problemsbe solved.

Although the operations of some of the disclosed methods are describedin a particular, sequential order for convenient presentation, it shouldbe understood that this manner of description encompasses rearrangement,unless a particular ordering is required by specific language set forthbelow. For example, operations described sequentially may in some casesbe rearranged or performed concurrently. Moreover, for the sake ofsimplicity, the attached figures may not show the various ways in whichthe disclosed methods, apparatus, and systems can be used in conjunctionwith other methods, apparatus, and systems.

The disclosed methods can be implemented using computer-executableinstructions stored on one or more computer-readable media (e.g.,non-transitory computer-readable media, such as one or more opticalmedia discs, volatile memory components (e.g., DRAM or SRAM), ornonvolatile memory or storage components (e.g., hard drives)) andexecuted on a computer (e.g., any commercially available computer or acomputer or image processor embedded in a device, such as a laptopcomputer, net book, web book, tablet computing device, smart phone, orother mobile computing device). Any of the intermediate or final datacreated and used during implementation of the disclosed methods orsystems can also be stored on one or more computer-readable media (e.g.,non-transitory computer-readable media).

For clarity, only certain selected aspects of the software-basedembodiments are described. Other details that are well known in the artare omitted. For example, it should be understood that thesoftware-based embodiments are not limited to any specific computerlanguage or program. Likewise, embodiments of the disclosed technologyare not limited to any particular computer or type of hardware.Exemplary computing environments suitable for performing any of thedisclosed software-based methods are introduced below.

The disclosed methods can also be implemented using specializedcomputing hardware that is configured to perform any of the disclosedmethods. For example, the disclosed methods can be implemented by anintegrated circuit (e.g., an application specific integrated circuit(“ASIC”), a graphics processing unit (“GPU”), or programmable logicdevice (“PLD”), such as a field programmable gate array (“FPGA”))specially designed to implement any of the disclosed methods (e.g.,dedicated hardware configured to perform any of the disclosed imageprocessing techniques).

A. Exemplary Computing Environments

FIG. 1 illustrates a generalized example of a suitable computing deviceenvironment or computing hardware environment 100 in which embodimentsof the disclosed technology can be implemented. For example, encoders ordecoders configured to perform any of the disclosed deblockingtechniques can be implemented using embodiments of the computinghardware environment 100. The computing hardware environment 100 is notintended to suggest any limitation as to the scope of use orfunctionality of the disclosed technology, as the technology can beimplemented in diverse general-purpose or special-purpose computingenvironments.

With reference to FIG. 1, the computing hardware environment 100includes at least one processing unit 110 and memory 120. In FIG. 1,this most basic configuration 130 is included within a dashed line. Theprocessing unit 110 executes computer-executable instructions. In amulti-processing system, multiple processing units executecomputer-executable instructions to increase processing power. Thememory 120 can be volatile memory (e.g., registers, cache, RAM, DRAM,SRAM), non-volatile memory (e.g., ROM, EEPROM, flash memory), or somecombination of the two. The memory 120 can store software 180 forimplementing one or more of the disclosed deblocking techniques. Forexample, the memory 120 can store software 180 for implementing any ofthe disclosed methods.

The computing hardware environment can have additional features. Forexample, the computing hardware environment 100 includes a storagedevice 140, one or more input devices 150, one or more output devices160, and one or more communication connections 170. An interconnectionmechanism (not shown) such as a bus, controller, or networkinterconnects the components of the computing hardware environment 100.Typically, operating system software (not shown) provides an operatingenvironment for other software executing in the computing hardwareenvironment 100, and coordinates activities of the components of thecomputing hardware environment 100.

The storage device 140 is a type of non-volatile memory and can beremovable or non-removable. The storage device 140 includes, forinstance, magnetic disks (e.g., hard drives), magnetic tapes orcassettes, optical storage media (e.g., CD-ROMs or DVDs), or any othertangible non-transitory storage medium that can be used to storeinformation and which can be accessed within or by the computinghardware environment 100. The storage device 140 can also store thesoftware 180 for implementing any of the described techniques.

The input device(s) 150 can be a touch input device such as a keyboard,mouse, touch screen, pen, trackball, a voice input device, a scanningdevice, or another device that provides input to the computingenvironment 100. The output device(s) 160 can be a display device, touchscreen, printer, speaker, CD-writer, or another device that providesoutput from the computing environment 100.

The communication connection(s) 170 enable communication over acommunication medium to another computing entity. The communicationmedium conveys information such as computer-executable instructions, anyof the intermediate or final messages or data used in implementingembodiments of the disclosed technology. By way of example, and notlimitation, communication media include wired or wireless techniquesimplemented with an electrical, optical, RF, infrared, acoustic, orother carrier.

The various methods disclosed herein (e.g., any of the discloseddeblocking techniques) can be described in the general context ofcomputer-executable instructions stored on one or more computer-readablemedia (e.g., tangible non-transitory computer-readable media such asmemory 120 and storage 140). The various methods disclosed herein canalso be described in the general context of computer-executableinstructions, such as those included in program modules, being executedby a processor in a computing environment. Generally, program modulesinclude routines, programs, libraries, objects, classes, components,data structures, etc. that perform particular tasks or implementparticular abstract data types. The functionality of the program modulesmay be combined or split between program modules as desired in variousembodiments. Any of the disclosed methods can also be performed using adistributed computing environment (e.g., a client-server network, cloudcomputing environment, wide area network, or local area network).

B. Examples of Generalized Video Encoder and Decoders

The deblocking techniques described herein can be incorporated intoembodiments of a video encoder and/or decoder. For example, in certainimplementations, the deblocking filter techniques are used in connectionwith an encoder and/or decoder implementing the H.264 AVC standard orH.264 HEVC standard. In alternative embodiments, the deblockingtechniques described herein are implemented independently or incombination in the context of other digital signal compression systems,and other video codec standards. FIGS. 2-5 below illustrate the generaloperation of an example encoder and decoder (such as an H.264/AVCencoder or decoder) in which embodiments of the disclosed technology canbe used. In particular, FIG. 2 is a block diagram of a generalized videoencoder system 200, and FIG. 3 is a block diagram of a generalized videodecoder system 300. The relationships shown between modules within theencoder and the decoder indicate the main flow of information in theencoder and decoder; other relationships are not shown for the sake ofsimplicity. FIGS. 2 and 3 generally do not show side informationindicating the encoder settings, modes, tables, etc. used for a videosequence, frame, macroblock, block, etc. Such side information is sentin the output bit stream, typically after the information is entropyencoded. The format of the output bit stream can be a H.264 format oranother format.

The encoder system 200 and decoder system 300 are block-based andsupport a 4:2:0 macroblock format with each macroblock including four8×8 luminance blocks (at times treated as one 16×16 macroblock) and two8×8 chrominance blocks. Alternatively, the encoder 200 and decoder 300are object-based, use a different macroblock or block format, or performoperations on sets of pixels of different sizes or configurations than8×8 blocks and 16×16 macroblocks.

Depending on the implementation and the type of compression desired,modules of the encoder or decoder can be added, omitted, split intomultiple modules, combined with other modules, and/or replaced with likemodules. In alternative embodiments, encoder or decoders with differentmodules and/or other configurations of modules perform one or more ofthe described techniques.

1. Video Encoder

FIG. 2 is a block diagram of a general video encoder system 200. Theencoder system 200 receives a sequence of video frames including acurrent frame 205, and produces compressed video information 295 asoutput. Particular embodiments of video encoders typically use avariation or supplemented version of the generalized encoder system 200.

The encoder system 200 compresses predicted frames and key frames. Forthe sake of presentation, FIG. 2 shows a path for key frames through theencoder system 200 and a path for predicted frames. Many of thecomponents of the encoder system 200 are used for compressing both keyframes and predicted frames. The exact operations performed by thosecomponents can vary depending on the type of information beingcompressed.

A predicted frame (also called a “P-frame,” “B-frame,” or “inter-codedframe”) is represented in terms of a prediction (or difference) from oneor more reference (or anchor) frames. A prediction residual is thedifference between what was predicted and the original frame. Incontrast, a key frame (also called an “I-frame,” or “intra-coded frame”)is compressed without reference to other frames. Other frames also canbe compressed without reference to other frames. For example, an intraB-frame (or “B/I-frame”), while not a true key frame, is also compressedwithout reference to other frames.

If the current frame 205 is a forward-predicted frame, a motionestimator 210 estimates motion of macroblocks or other sets of pixels ofthe current frame 205 with respect to a reference frame, which is thereconstructed previous frame 225 buffered in a frame store (e.g., framestore 220). If the current frame 205 is a bi-directionally-predictedframe (a B-frame), a motion estimator 210 estimates motion in thecurrent frame 205 with respect to two reconstructed reference frames.Typically, a motion estimator estimates motion in a B-frame with respectto a temporally previous reference frame and a temporally futurereference frame. Accordingly, the encoder system 200 can compriseseparate stores 220 and 222 for backward and forward reference frames.The motion estimator 210 can estimate motion by pixel, ½ pixel, ¼ pixel,or other increments, and can switch the resolution of the motionestimation on a frame-by-frame basis or other basis. The resolution ofthe motion estimation can be the same or different horizontally andvertically. The motion estimator 210 outputs as side information motioninformation 215, such as motion vectors. A motion compensator 230applies the motion information 215 to the reconstructed frame(s) 225 toform a motion-compensated current frame 235. The prediction is rarelyperfect, however, and the difference between the motion-compensatedcurrent frame 235 and the original current frame 205 is the predictionresidual 245. Alternatively, a motion estimator and motion compensatorapply another type of motion estimation/compensation.

A frequency transformer 260 converts the spatial domain videoinformation into frequency domain (spectral) data. For block-based videoframes, the frequency transformer 260 applies a discrete cosinetransform (“DCT”) or variant of DCT to blocks of the pixel data or theprediction residual data, producing blocks of DCT coefficients.Alternatively, the frequency transformer 260 applies anotherconventional frequency transform such as a Fourier transform or useswavelet or subband analysis. If the encoder uses spatial extrapolation(not shown in FIG. 2) to encode blocks of key frames, the frequencytransformer 260 can apply a re-oriented frequency transform such as askewed DCT to blocks of prediction residuals for the key frame. In someembodiments, the frequency transformer 260 applies an 8×8, 8×4, 4×8, orother size frequency transform (e.g., DCT) to prediction residuals forpredicted frames.

A quantizer 270 then quantizes the blocks of spectral data coefficients.The quantizer applies uniform, scalar quantization to the spectral datawith a step-size that varies on a frame-by-frame basis or other basis.Alternatively, the quantizer applies another type of quantization to thespectral data coefficients, for example, a non-uniform, vector, ornon-adaptive quantization, or directly quantizes spatial domain data inan encoder system that does not use frequency transformations. Inaddition to adaptive quantization, the encoder system 200 can use framedropping, adaptive filtering, or other techniques for rate control.

If a given macroblock in a predicted frame has no information of certaintypes (e.g., no motion information for the macroblock and no residualinformation), the encoders 200 may encode the macroblock as a skippedmacroblock. If so, the encoder signals the skipped macroblock in theoutput bit stream of compressed video information 295.

When a reconstructed current frame is needed for subsequent motionestimation/compensation, an inverse quantizer 276 performs inversequantization on the quantized spectral data coefficients. An inversefrequency transformer 266 then performs the inverse of the operations ofthe frequency transformer 260, producing a reconstructed predictionresidual (for a predicted frame) or a reconstructed key frame. If thecurrent frame 205 was a key frame, the reconstructed key frame is takenas the reconstructed current frame (not shown). If the current frame 205was a predicted frame, the reconstructed prediction residual is added tothe motion-compensated current frame 235 to form the reconstructedcurrent frame. A frame store (e.g., frame store 220) buffers thereconstructed current frame for use in predicting another frame. In someembodiments, the encoder applies a deblocking process to thereconstructed frame to adaptively smooth discontinuities in the blocksof the frame. For instance, the encoder can apply any of the deblockingtechniques disclosed herein to the reconstructed frame.

The entropy coder 280 compresses the output of the quantizer 270 as wellas certain side information (e.g., motion information 215, spatialextrapolation modes, quantization step size). Typical entropy codingtechniques include arithmetic coding, differential coding, Huffmancoding, run length coding, LZ coding, dictionary coding, andcombinations of the above. The entropy coder 280 typically usesdifferent coding techniques for different kinds of information (e.g., DCcoefficients, AC coefficients, and different kinds of side information),and can choose from among multiple code tables within a particularcoding technique.

The entropy coder 280 puts compressed video information 295 in thebuffer 290. A buffer level indicator is fed back to bit rate adaptivemodules. The compressed video information 295 is depleted from thebuffer 290 at a constant or relatively constant bit rate and stored forsubsequent streaming at that bit rate. Therefore, the level of thebuffer 290 is primarily a function of the entropy of the filtered,quantized video information, which affects the efficiency of the entropycoding. Alternatively, the encoder system 200 streams compressed videoinformation immediately following compression, and the level of thebuffer 290 also depends on the rate at which information is depletedfrom the buffer 290 for transmission.

Before or after the buffer 290, the compressed video information 295 canbe channel coded for transmission over the network. The channel codingcan apply error detection and correction data to the compressed videoinformation 295.

2. Video Decoder

FIG. 3 is a block diagram of a general video decoder system 300. Thedecoder system 300 receives information 395 for a compressed sequence ofvideo frames and produces output including a reconstructed frame 305.Particular embodiments of video decoders typically use a variation orsupplemented version of the generalized decoder 300.

The decoder system 300 decompresses predicted frames and key frames. Forthe sake of presentation, FIG. 3 shows a path for key frames through thedecoder system 300 and a path for predicted frames. Many of thecomponents of the decoder system 300 are used for decompressing both keyframes and predicted frames. The exact operations performed by thosecomponents can vary depending on the type of information beingdecompressed.

A buffer 390 receives the information 395 for the compressed videosequence and makes the received information available to the entropydecoder 380. The buffer 390 typically receives the information at a ratethat is fairly constant over time, and includes a jitter buffer tosmooth short-term variations in bandwidth or transmission. The buffer390 can include a playback buffer and other buffers as well.Alternatively, the buffer 390 receives information at a varying rate.Before or after the buffer 390, the compressed video information can bechannel decoded and processed for error detection and correction.

The entropy decoder 380 entropy decodes entropy-coded quantized data aswell as entropy-coded side information (e.g., motion information 315,spatial extrapolation modes, quantization step size), typically applyingthe inverse of the entropy encoding performed in the encoder. Entropydecoding techniques include arithmetic decoding, differential decoding,Huffman decoding, run length decoding, LZ decoding, dictionary decoding,and combinations of the above. The entropy decoder 380 frequently usesdifferent decoding techniques for different kinds of information (e.g.,DC coefficients, AC coefficients, and different kinds of sideinformation), and can choose from among multiple code tables within aparticular decoding technique.

A motion compensator 330 applies motion information 315 to one or morereference frames 325 to form a prediction 335 of the frame 305 beingreconstructed. For example, the motion compensator 330 uses a macroblockmotion vector to find a macroblock in a reference frame 325. A framebuffer (e.g., frame buffer 320) stores previously reconstructed framesfor use as reference frames. Typically, B-frames have more than onereference frame (e.g., a temporally previous reference frame and atemporally future reference frame). Accordingly, the decoder system 300can comprise separate frame buffers 320 and 322 for backward and forwardreference frames.

The motion compensator 330 can compensate for motion at pixel, ½ pixel,¼ pixel, or other increments, and can switch the resolution of themotion compensation on a frame-by-frame basis or other basis. Theresolution of the motion compensation can be the same or differenthorizontally and vertically. Alternatively, a motion compensator appliesanother type of motion compensation. The prediction by the motioncompensator is rarely perfect, so the decoder 300 also reconstructsprediction residuals. When the decoder needs a reconstructed frame forsubsequent motion compensation, a frame buffer (e.g., frame buffer 320)buffers the reconstructed frame for use in predicting another frame. Insome embodiments, the decoder applies a deblocking process to thereconstructed frame to adaptively smooth discontinuities in the blocksof the frame. For instance, the decoder can apply any of the deblockingtechniques disclosed herein to the reconstructed frame.

An inverse quantizer 370 inverse quantizes entropy-decoded data. Ingeneral, the inverse quantizer applies uniform, scalar inversequantization to the entropy-decoded data with a step-size that varies ona frame-by-frame basis or other basis. Alternatively, the inversequantizer applies another type of inverse quantization to the data, forexample, a non-uniform, vector, or non-adaptive quantization, ordirectly inverse quantizes spatial domain data in a decoder system thatdoes not use inverse frequency transformations.

An inverse frequency transformer 360 converts the quantized, frequencydomain data into spatial domain video information. For block-based videoframes, the inverse frequency transformer 360 applies an inverse DCT(“IDCT”) or variant of IDCT to blocks of the DCT coefficients, producingpixel data or prediction residual data for key frames or predictedframes, respectively. Alternatively, the frequency transformer 360applies another conventional inverse frequency transform such as aFourier transform or uses wavelet or subband synthesis. If the decoderuses spatial extrapolation (not shown in FIG. 3) to decode blocks of keyframes, the inverse frequency transformer 360 can apply a re-orientedinverse frequency transform such as a skewed IDCT to blocks ofprediction residuals for the key frame. In some embodiments, the inversefrequency transformer 360 applies an 8×8, 8×4, 4×8, or other sizeinverse frequency transforms (e.g., IDCT) to prediction residuals forpredicted frames.

When a skipped macroblock is signaled in the bit stream of information395 for a compressed sequence of video frames, the decoder 300reconstructs the skipped macroblock without using the information (e.g.,motion information and/or residual information) normally included in thebit stream for non-skipped macroblocks.

C. Loop Filtering

Quantization and other lossy processing of prediction residuals cancause block artifacts (artifacts at block boundaries) in referenceframes that are used for motion estimation of subsequent predictedframes. Post-processing by a decoder to remove blocky artifacts afterreconstruction of a video sequence improves perceptual quality. However,post-processing does not improve motion compensation using thereconstructed frames as reference frames and does not improvecompression efficiency. With or without post-processing, the same amountof bits is used for compression. Moreover, the filters used fordeblocking in post-processing can introduce too much smoothing inreference frames used for motion estimation/compensation.

In embodiments of the disclosed technology, a video encoder processes areconstructed frame to reduce blocky artifacts prior to motionestimation using the reference frame. Additionally, in embodiments ofthe disclosed technology, a video decoder processes the reconstructedframe to reduce blocky artifacts prior to motion compensation using thereference frame. With deblocking, a reference frame becomes a betterreference candidate to encode the following frame. Thus, usingembodiments of the disclosed deblocking techniques can improve thequality of motion estimation/compensation, resulting in betterprediction and lower bit rate for prediction residuals. The deblockingprocesses described herein are especially helpful in low bit rateapplications.

In some embodiments, following the reconstruction of a frame in a videoencoder or decoder, the encoder/decoder applies a deblocking techniqueto blocks in the reconstructed frame. The deblocking technique caninclude, for example, applying a directional deblocking or smoothingfilter to blocks in the reconstructed frame. For instance, theencoder/decoder can apply the deblocking filter across boundary rowsand/or columns of a selected block. The deblocking filter can removeboundary discontinuities between blocks in the reconstructed frame whilepreserving real edges in the video image, when appropriate, therebyimproving the quality of subsequent motion estimation using thereconstructed frame as a reference frame. In certain embodiments, theencoder/decoder performs deblocking after reconstructing the frame in amotion compensation loop in order for motion compensation to work asexpected. This contrasts with typical post-processing deblockingprocesses, which operate on the whole image outside of the motioncompensation loop. Further, a decoder can apply an additionalpost-processing deblocking filter to further smooth a reconstructedframe for playback after applying any of the disclosed deblockingtechniques to a reference frame during motion compensation.

FIG. 4 shows a motion estimation/compensation loop in a video encoderthat includes a deblocking process. FIG. 5 shows a corresponding motioncompensation loop in a video decoder that includes a deblocking process.The deblocking process can comprise any of the deblocking processesdisclosed herein and described in more detail below (e.g., any of thecontent-adaptive directional deblocking techniques disclosed herein).

With reference to FIG. 4, a motion estimation/compensation loop 400includes motion estimation 410 and motion compensation 420 of an inputframe 405. The motion estimation 410 finds motion information for theinput frame 405 with respect to a reference frame 495, which istypically a previously reconstructed intra- or inter-coded frame. Inalternative embodiments, the loop filter is applied tobackward-predicted or bi-directionally-predicted frames. The motionestimation 410 produces motion information such as a set of motionvectors for the frame. The motion compensation 420 applies the motioninformation to the reference frame 495 to produce a predicted frame 425.

The prediction is rarely perfect, so the encoder computes 430 theerror/prediction residual 435 as the difference between the originalinput frame 405 and the predicted frame 425. The frequency transformer440 frequency transforms the prediction residual 435, and the quantizer450 quantizes the frequency coefficients for the prediction residual 435before passing them to downstream components of the encoder.

In the motion estimation/compensation loop, the inverse quantizer 460inverse quantizes the frequency coefficients of the prediction residual435, and the inverse frequency transformer 470 changes the predictionresidual 435 back to the spatial domain, producing a reconstructed error475 for the frame 405.

The encoder then combines 480 the reconstructed error 475 with thepredicted frame 425 to produce a reconstructed frame. The encoderapplies a deblocking process 490 (e.g., a deblocking process accordingto any of the disclosed embodiments) to the reconstructed frame andstores the reconstructed frame in a frame buffer 492 for use as areference frame 495 for the next input frame. Alternatively, thedeblocking process 490 follows the frame buffer 492. In alternativeembodiments, the arrangement or constituents of the motionestimation/compensation loop changes, but the encoder still applies thedeblocking process to reference frames.

With reference to FIG. 5, a motion compensation loop 500 includes motioncompensation 520 to produce a reconstructed frame 585. The decoderreceives motion information 515 from the encoder. The motioncompensation 520 applies the motion information 515 to a reference frame595 to produce a predicted frame 525.

In a separate path, the inverse quantizer 560 inverse quantizes thefrequency coefficients of a prediction residual, and the inversefrequency transformer 570 changes the prediction residual back to thespatial domain, producing a reconstructed error 575 for the frame 585.

The decoder then combines 580 the reconstructed error 575 with thepredicted frame 525 to produce the reconstructed frame 585, which isoutput from the decoder. The decoder also applies a deblocking process590 (e.g., a deblocking process according to any of the disclosedembodiments) to the reconstructed frame 585 and stores the reconstructedframe in a frame buffer 592 for use as the reference frame 595 for thenext input frame. Alternatively, the loop filter 590 follows the framebuffer 592. In alternative embodiments, the arrangement or constituentsof the motion compensation loop changes, but the decoder still appliesthe deblocking process to reference frames.

In the video encoder 200/decoder 300, the compressed bitstream does notneed to provide any indication whether out-of-loop deblocking should beemployed. The latter is usually determined by the decoder 300 based onsimple rules and the availability of additional computing cycles.Signals may be provided by the encoder in the bitstream indicatingwhether to use post-processing. On the other hand, the application ofin-loop deblocking is typically indicated within the bitstream to avoiddrift or mismatch. This indication may be through a sequence based flag,or possibly using frame or sub-frame based flags. A decoder thatencounters a frame indicating that it has been in-loop deblocked will inturn decode and deblock that frame for bitstream compliance.

II. Exemplary Content-Adaptive Deblocking Techniques A. A GeneralizedContent-Adaptive Deblocking Process

FIG. 6 is a block diagram showing an exemplary embodiment of ageneralized deblocking process 600 in accordance with the disclosedtechnology. The illustrated deblocking process can be employed in amotion estimation/compensation loop of an encoder or decoder (e.g., asthe deblocking process 490 shown in FIG. 4, or the deblocking process590 shown in FIG. 5). In certain embodiments, only intra-coded frames(I-frames or key frames) are deblocked using the deblocking process 600.In other embodiments, however, inter-coded frames or both intra- andinter-coded frames are deblocked using the deblocking process 600.

The exemplary deblocking process 600 is performed on a reconstructedframe 610. The reconstructed frame can be a decoded frame after inverseDCT and motion compensation. At 612, the luminance components of thereconstructed frame 610 are processed with a deblocking filter (e.g., anH.264/AVC deblocking filter). In other embodiments, however, thisinitial deblocking act is absent. At 614, orientation energy edgedetection (“OEED”) is performed on at least a portion of the initiallydeblocked frame. In some embodiments, for instance, global OEED isconducted on the initially deblocked image. As more fully explainedbelow, global OEED can be used to detect the edges in the initiallydeblocked frame, thereby partitioning the image into local directionalfeatures (“LDFs”). For example, OEED can also be used to identify theedge orientations of the LDFs in the image. At 616, a deblocking mode isdetermined for each block in the frame. In particular embodiments, andas more fully explained below, the deblocking mode decision can be basedat least in part on the LDF edge detection and edge orientation of theLDF in a given block. Based at least in part on the results of the OEED,different deblocking modes can be decided for blocks in the frame (e.g.,each of the blocks in the frame). At 618, content-adaptive deblocking isperformed on both the luminance and chroma components of the decodedframe. The deblocking can be performed for the blocks using thedeblocking modes determined at 616. For example, in certain embodiments,the deblocking filter orientations and activation thresholds can bebased at least in part on the deblocking mode decisions from 616. At620, the deblocked reconstructed frame is generated. As noted above, thereconstructed frame can be used as a reference frame for further motioncompensation/estimation. However, because the deblocking scheme 600 hassmoothed or appropriately filtered the directional LDFs at the blockboundaries of the reconstructed frame, undesirable and visually annoyingblock artifacts can be removed or substantially removed from thereconstructed frame.

B. Orientation Energy Edge Detection

In embodiments of the disclosed technology, an image is partitioned intoLDFs using an orientation energy edge detection (“OEED”) technique. OEEDcan be used to extract edges and edge orientations. For example, edgescan be extracted by orientation energy on an initially deblockedluminance image I. To implement OEED, sets of one or more Gaussianderivative filters can be used, where each set of filters is orientedalong a different orientation. In particular embodiments of thedisclosed technology, the OEED filters are defined as follows:W(x,y,θ)=(F _(θ) ^(o) *I)²+(F _(θ) ^(e) *I)²  (1)where F_(θ) ^(o) and F_(θ) ^(e) are the first and second Gaussianderivative filters, respectively, at orientation θ.

In one desirable embodiment, eight sets of filters are used. FIG. 8 is ablock diagram 800 showing eight sets of two filters each, where each setincludes orientation energy filters having a different orientation thanthe filters of the other sets. In particular, each set includes a firstGaussian derivative filter (shown at row 810) and a second Gaussianderivative filter (shown at row 812). In the illustrated embodiment, thefilters have orientations of 180° (which can also be viewed as 0°),157.5°, 135°, 112.5°, 90°, 67.5°, 45°, and 22.5°. In particularembodiments, the first and second Gaussian derivative filters atorientation θ have the following form:

$\begin{matrix}{{{F^{o}\left( {x,y,\theta} \right)} = {{\frac{1}{2\;\pi\;\sigma_{x}\sigma_{y}} \cdot \frac{{\hat{x}}^{2} - 1}{\sigma_{x}^{2}}}\exp\left\{ {{- \frac{1}{2}}\left( {\frac{{\hat{x}}^{2}}{\sigma_{x}^{2}} + \frac{{\hat{y}}^{2}}{\sigma_{y}^{2}}} \right)} \right\}}}{{F^{e}\left( {x,y,\theta} \right)} = {{\frac{1}{2\;\pi\;\sigma_{x}\sigma_{y}} \cdot \frac{- \hat{x}}{\sigma_{x}^{2}}}\exp\left\{ {{- \frac{1}{2}}\left( {\frac{{\hat{x}}^{2}}{\sigma_{x}^{2}} + \frac{{\hat{y}}^{2}}{\sigma_{y}^{2}}} \right)} \right\}}}{\hat{x} = {{x\;\cos\;\theta} - {y\;\sin\;\theta}}}{\hat{y} = {{x\;\sin\;\theta} + {y\;\cos\;\theta}}}} & (2)\end{matrix}$where σ_(x) and σ_(y) are filter parameters that can vary fromimplementation to implementation. In certain implementations of theseembodiments, the length and taps of the filter are further defined as:

$\begin{matrix}{{T = \left\lfloor {{{\max\left( {\sigma_{x},\sigma_{y}} \right)} \cdot A} + 0.5} \right\rfloor}{x,{y \in \left\lbrack {{- \frac{T}{2}},\frac{T}{2}} \right\rbrack}}} & (3)\end{matrix}$where A is a parameter that can vary from implementation toimplementation. Furthermore, the angle discretization used for thefilters can vary from implementation to implementation. In oneimplementation, however, the angle discretization is:

$\begin{matrix}{{\theta = \frac{2\;\pi\; n}{N}},{n = 0},\ldots\mspace{14mu},{{N/2} - 1}} & (4)\end{matrix}$The value of N can also vary from implementation to implementation. Inone particular implementation, the values of σ_(x), σ_(y), A, and N areas follows:

-   -   σ_(x)=1.3,    -   σ_(y)=3.9,    -   A=4.2426,    -   N=16        For each pixel (x, y) in I, and with reference to OEED filters        having the form shown in Expression (1), the filter output        energy W will have a maximum at an orientation parallel to an        edge, and an energy maximum along a line perpendicular to the        edge. Therefore, and according to one embodiment, edges can be        found by marking or otherwise designating pixels in the image I        (e.g., each pixel throughout a plurality of blocks, such as each        pixel throughout all blocks of the image) that satisfy:

$\begin{matrix}{{{\frac{\partial\;}{\partial\theta}{W(p)}} = 0},{{\frac{\partial\;}{\partial v_{\theta}}{W(p)}} = 0}} & (5)\end{matrix}$where v_(θ) is the unit vector orthogonal to θ. Edges can also be foundby marking pixels where Expression (5) is near zero or approximatelyzero (e.g., within a deviation of zero computed to accommodate theangular discretization between the OEED filters). Furthermore, as aresult of finding the edges using the OEED filters, the orientations ofthe edges will also be known. In particular, the orientation of the OEEDfilter that causes Expression (5) (or similar expression) to besatisfied corresponds to the orientation of the edge pixel beingevaluated.

By using OEED, an edge map recording edge pixel locations can becreated. Additionally, by using OEED, an angle map (or orientation map)recording the orientation of each pixel can also be created. Forinstance, FIGS. 9, 10, 11, and 12 illustrate exemplary LDF partitions,edge maps, and angle maps that can be created using OEED. In particular,FIG. 9 shows an example of a reconstructed image 900 that may be inputinto a deblocking process, such as the deblocking process 600. FIG. 10shows an LDF partition 1000 of the image 900 obtained using anembodiment of the OEED described herein. In particular, the exemplaryLDF partition 1000 is a block-level LDF partition where blocks are shownin white if they contain an edge as detected according to acorresponding edge map obtained from an embodiment of OEED. For example,FIG. 11 shows an edge map 1100 of the image 900 obtained from anembodiment of OEED using Expressions (1) and (5). In FIG. 11 edge pixelssatisfying Expression (5) are marked white. FIG. 12 shows an angle map1200 obtained using OEED. In FIG. 12, different intensities indicatedifferent orientations.

FIG. 21 shows an LDF partition 2100 of the image 900 obtained from theintra prediction mode as described in J. Jeong et al., “A directionaldeblocking filter based on intra prediction for H.264/AVC,” IEICEElectronics Express, vol. 6, no. 12, pp. 864-869 (June 2009)(hereinafter “Jeong”). As can be seen by comparing the LDF partition1000 in FIG. 10 to the LDF partition 2100 in FIG. 21, OEED is moreaccurate than intra prediction in distinguishing LDFs, even at a low bitrate.

Compared with edge detection techniques using only image gradients, OEEDcan jointly consider edge location and orientation. In addition, OEEDutilizes a class of nonlinear filters which are more appropriate forlocalizing composite edges, so it is able to provide more reliableinformation to distinguish LDF regions. As shown in block diagram 600,an initial deblocking of the luminance components can be performed priorto OEED (e.g., using the H.264/AVC deblocking scheme). Such an initialdeblocking technique can further improve the accuracy of the edge andangle maps obtained from OEED and from which certain parameters can bedetermined later in content-adaptive deblocking schemes.

C. Deblocking Mode Decision

In certain embodiments, one or more the LDF partition, the edge map, orthe angle map resulting from OEED are used, at least in part, to selectan appropriate deblocking mode for each block. Although the number ofavailable deblocking modes can vary from implementation toimplementation, one particular embodiment of the disclosed technologyhas eight deblocking modes: six directional deblocking modes (eachhaving a directional deblocking filter with a different orientation), anextra smoothing mode, and a standard deblocking mode (which can comprisea deblocking technique used in a known standard, such as the H.264/AVCdeblocking technique). Furthermore, in this embodiment, the sixdirectional deblocking modes can comprise directional deblocking filtershaving orientations that correspond to orientations of the Gaussianderivative filters used during OEED and having modified activationthresholds. In one particular implementation, the six directionaldeblocking filters correspond to orientations 2, 3, 4, 6, 7, and 8 shownin FIG. 8 (the non-horizontal and non-vertical orientations). Forexample, the orientations can be 157.5°, 135°, 112.5°, 67.5°, 45°, and22.5°.

To select which deblocking mode to use for a selected block (e.g., foreach 4×4 or 8×8 transformed intra block), a variety of techniques can beused. In certain embodiments, for example, one of the directionaldeblocking modes is selected if the block is determined to havedirectional features that are consistent with one or more of itsneighboring blocks. Metrics can be applied to the edge pixels of aselected block to evaluate the consistency of the edge orientationswithin the block. For example, an average orientation of the edge pixelsin the selected block can be determined and used to evaluate edgeorientation consistency. Additionally, an edge orientation deviationamong the edge pixels in the block can be computed and also used toevaluate edge orientation consistency.

In certain embodiments, a deblocking mode decision is made for eachtransformed intra block B_(I) with its upper and left neighbors B_(U)and B_(L) available. In one particular implementation, if edge pixelsappear in B_(I), an average orientation index m_(I) is computed for theblock. The average orientation index m_(I) can be computed by averagingthe orientations of edge pixels in the block B_(I). The result can berounded to be an integer value or can have some other resolution. In oneexemplary implementation, the orientation values correspond to thoseshown in FIG. 8 and are integer values between 1 and 8. In certainimplementations, an orientation variance value ov_(I) is also computedfor the edge pixels in the block B_(I). The orientation variance valuecan be the statistical variance computed from the observed edgeorientations. In other implementations, however, other measures of thedeviations between the observed edge orientations can be used (e.g., thestandard deviation, absolute deviation, or other such statisticalmetric).

Similar average orientation indices and orientation variances values canbe computed for one or more of the neighboring blocks. For example, inone particular implementation, average orientation indices andorientation variances values are computed for the upper neighboring andthe leftward neighboring block, resulting in m_(U), ov_(U), m_(L), andov_(L). If there are no edge pixels in the one or more neighboringblocks, then the corresponding average orientations and orientationvariances can be set to a fixed value (e.g., 0).

A distance metric can then be used to evaluate whether the averageorientation indices of the selected block and the one or moreneighboring block are indicative of edges having a consistentorientation. The orientation variance values for the selected block andthe one or more neighboring blocks can also be evaluated. For example,in one particular implementation, a distance metric D(m_(a), m_(b))between two different orientation indices is used. The distance metriccan be the absolute value of the difference between the two averageorientation indices and, in some embodiments, can be weighted. In oneparticular implementation, the following evaluation of the averageorientation values and the orientation variance values is made:D(m _(I) ,m _(U))+D(m _(I) ,m _(L))<T ₁  (6)ov _(I) +ov _(U) +ov _(L) <T ₂  (7)where T₁ and T₂ are threshold values that can be varied fromimplementation to implementation depending on the desired directionalfilter sensitivity. Furthermore, in certain embodiments, an evaluationusing Expressions (6) and (7) is only performed if the orientationvariance index for the selected block B_(i) indicates that theorientation is non-vertical or non-horizontal (e.g., in embodiments inwhich the orientations correspond to FIG. 8, m_(I)≠1,5). Satisfaction ofthe Expressions (6) and (7) indicates that the current block B_(I) hasconsistent directional features with its neighbors. Consequently, adirectional deblocking mode using a directional deblocking filter havingthe appropriate orientation can be selected for block B_(I). Such adirectional deblocking filter can be used to reduce the blockiness ofthe block boundaries (e.g., at the boundaries of m_(I), m_(U), andm_(L)) while maintaining the existence of real edges along the detectedorientation. As more fully explained below, an additional thresholdevaluation can be performed before activating the deblocking filter. Forexample, the boundaries between the blocks can be evaluated to determineif the boundaries include “true” image edges that are desirably leftunfiltered.

In certain embodiments, if edge pixels are not present in the selectedblock B_(I), then the block can be evaluated to determine if the blockis part of a region that is free of LDFs (a consecutive non-LDF region),in which case a smoothing filter can be applied. Blocking artifacts inconsecutive non-LDF regions are among the most visually displeasingblocking artifacts because the true image intends for the region to havesmoothly varying color or intensity gradations, whereas the compressedversion often results in obvious color and intensity contrasts at theblock borders. To determine whether the selected block B_(I) is in aconsecutive non-LDF region, a variety of metrics can be used. In certainembodiments, however, intensity variances can be evaluated between theselected block B_(I) and one or more neighboring blocks. In otherembodiments, chrominance variances can additionally or alternatively beevaluated.

In one particular implementation, for each block B_(I) not having edgepixels with its upper and left neighbors B_(U) and B_(L) available, theintensity variances iv_(I), iv_(U) and iv_(L), can be computed for thethree blocks, respectively. The intensity variance value can be thestatistical variance computed from the pixel intensities in eachrespective block. In other implementations, however, other measures ofthe deviations between the pixel intensities can be used (e.g., thestandard deviation, absolute deviation, or other such statisticalmetric). The intensity variances can then be evaluated. In oneparticular implementation, the following evaluation of the intensityvariances is made:iv _(I) +iv _(U) +iv _(L) <T ₃  (8)where T₃ is a threshold value that can be varied from implementation toimplementation depending on the desired smoothing filter sensitivity.Satisfaction of the Expression (8) indicates that the current blockB_(I) is inside of a consecutive non-LDF region. Consequently, adeblocking mode using a smoothing filter is selected for block B_(I). Incertain implementations, the smoothing filter is applied with no furtherthresholds being evaluated. In other implementations, additionalthresholds can be evaluated to determine whether to apply the smoothingfilter.

In certain embodiments, if neither a directional deblocking or an extrasmoothing mode is selected for a block B_(I), then a standard deblockingmode can be applied (e.g., the h.264/AVC deblocking scheme).Additionally, the standard deblocking mode can be applied to blockshaving horizontally or vertically oriented edges (e.g., in embodimentsin which the orientations correspond to FIG. 8, m_(I)≠1,5).

FIG. 13 is an exemplary image 1300 showing blocks in consecutive non-LDFregions detected using an evaluation according to Expression (8). Inparticular, the blocks having highlighted upper and left borders(several of which are shown at 1310) are blocks determined to be inconsecutive non-LDF regions. Accordingly, and in certain embodiments ofthe disclosed technology, a smoothing filter is selected for thehighlighted blocks. FIG. 13 also illustrates that a single video framecan have a variety of content, creating different deblocking modedistributions throughout the image. The variety of image content furtherillustrates the desirability of a flexible deblocking scheme.

In some embodiments, the deblocking selection process can be affected bythe block size being evaluated. For example, in one embodiment, only 4×4and 8×8 blocks, which often contain image details, are evaluated todetermine whether they have edge pixels present and whether adirectional deblocking filter should be applied to the block.Furthermore, in certain embodiments, only 16×16 luminance blocks, whichoften contain smooth regions, are evaluated to determine whether theyare part of a non-LDF region such that a smoothing filter should beapplied. All other blocks in such embodiments can be deblocked using astandard deblocking process, such as the H.264/AVC deblocking process.

Once the deblocking mode decisions have been made, the selecteddeblocking filters can be applied to the video frame in a variety ofmanners. In one embodiment, for instance, the deblocking filters(including the directional deblocking filters and the smoothing filter)are applied in a raster-scan order at the macroblock level for bothluminance and chroma components. In other embodiments, the deblockingfilters are applied in different orders, such as in a box-out fashion,wipe fashion, by applying a selected filter to all of its correspondingblocks before applying a next selected filter, by applying the filtersto non-LDF regions followed by LDF regions, or vice versa. In oneparticular implementation, once the deblocking mode decision is done,the 8 different deblocking filters are simultaneously employed in araster-scan order at the macroblock level for both luminance and chromacomponents. The reconstructed frame is obtained in a single deblockingpass.

D. Exemplary Directional Deblocking Filters

In certain embodiments, when a directional deblocking mode is selected,the filtering involves pixels that are no longer in a line perpendicularto the block boundary. For example, in one particular implementation,the filtering is along six different orientations corresponding to theorientations shown in FIG. 8. FIG. 14 is a block diagram 1400illustrating examples of six filtering orientations across verticalblock boundaries. Corresponding filter orientations can be used acrosshorizontal block boundaries. In particular, FIG. 14 shows examplefilters from filter bank 1410 (related to orientation 7 from FIG. 8),filter bank 1412 (related to orientation 3 from FIG. 8), filter 1414(related to orientation 8 from FIG. 8), filter bank 1416 (related toorientation 2 from FIG. 8), filter bank 1418 (related to orientation 6from FIG. 8), and filter bank 1420 (related to orientation 4 from FIG.8). In FIG. 14, and for ease of presentation, only selected pixels usedby the filters are shown. The other pixels used with the filters can beeasily determined by those of ordinary skill in the art based on what isshown in FIG. 14 and this description. For example, and in theillustrated embodiment, there are four filters for each of filter bank1410 (related to orientation 7 from FIG. 8), filter bank 1412 (relatedto orientation 3 from FIG. 8), filter bank 1414 (related to orientation8 from FIG. 8), and filter bank 1416 (related to orientation 2 from FIG.8). For these filter banks, the first and fourth filters in therespective filter banks are shown by the lines in FIG. 14. In theillustrated embodiment, there are eight filters for each of filter bank1418 (related to orientation 6 from FIG. 8) and filter bank 1420(related to orientation 4 from FIG. 8). For these filter banks, thefirst and eighth filters for the respective filter banks are shown bythe lines in FIG. 14. As illustrated in FIG. 14, the filters for filterbank 1418 and 1420 use interpolation at certain half pixel locations,even though only integer pixels are filtered. Values at these half-pixellocations can be computed, for example, using a bilinear filter.Furthermore, in FIG. 14, the current block (block B_(I)) is the 4×4block of pixels located in the middle-right of each illustrated pixelgroup. Additionally, for the example filters shown in filter bank 1416(related to orientation 8) and filter bank 1418 (related to orientation2), some of the pixels used by the filters extend beyond the illustratedpixel group and are not shown. For example, q₂ and q₃ are not shown inthe left-most filter shown in filter bank 1416, whereas p₂ and p₃ arenot shown in the right-most filter shown in filter bank 1418. Theposition of these missing pixels, however, can be easily deduced as theyare symmetrical with the pixel positions illustrated.

In one embodiment, if p₃, . . . , p₀, q₀, . . . , q₃ correspond to theselected pixels for a 1D filter, their values are modified as followsduring directional deblocking:p _(n)=(λ_(n,1), . . . ,λ_(n,8))(p ₃ , . . . ,p ₀ ,q ₀ , . . . ,q₃)+λ_(n,0)q _(n)=(λ_(n,1), . . . ,λ_(n,8))(q ₃ , . . . ,q ₀ ,p ₀ , . . . ,p₃)+λ_(n,0)  (9)where λ_(n,m) is a filter coefficient. In a particular implementation,the filter coefficients are the same as those used in H.264/AVC and havea range of (0≤n≤2, 0≤m≤8). More specifically, in one particularimplementation, the filter coefficients are computed using themethodology outlined in Section 8 of the H.264/AVC standard, which isdescribed in International Telecommunication Union-Telecommunication(ITU-T), Recommendation H.264 (2003), or in any of the subsequentamendments or corrigendums.

According to the H.264/AVC standard, there are two thresholds α and βdetermined by the average QP employed over the block boundary, anddeblocking only takes place if:|p ₀ −q ₀|<α(QP)|p ₀ −p ₀|<β(QP)  (10)|q ₀ −q ₀|<β(QP)As the deblocking performance depends on these thresholds, the twothresholds α and β should be carefully selected.

In embodiments of the directional deblocking filters described herein,the two thresholds α and β are also used to determine whether thedirectional deblocking filter should be applied, or whether the edge atthe block boundary is an actual edge that should be preserved withoutfiltering. The two thresholds are desirably selected by not onlyconsidering QP but also the directional mode. Because directionaldeblocking is performed along the edge orientation (or alongapproximately the edge orientation), the filter decision thresholds todistinguish edges from blocking degradation are relaxed in certainembodiments. For example, in one particular implementation, Expression(10) is modified with the following filter decision thresholds:α′=A(QP)B(m _(I))αβ′=A(QP)B(m _(I))β′  (11)where A is a magnification parameter related to QP, and B is amodulation parameter related to the directional mode m_(I).

The magnification parameter A can be determined by evaluating a set ofimages containing typical directional edges. FIG. 15 is a graph 1500showing the relationship between A and QP according to one particularembodiment. Using the relationships illustrated in FIG. 15, at high bitrate (low QP), image details are still well preserved, so directionaldeblocking is less encouraged to avoid smoothing anti-directionaltexture, while at low bit rate (high QP), directional deblocking can bemuch stronger, as it will not blur the remaining edges. Therelationships shown in FIG. 15 should not be construed as limiting,however, as various other relationships can be used in embodiments ofthe disclosed technology. For example, other relationships can alsoincrease the value of A as QP is correspondingly increased. Furthermore,the value of A need not increase in a step-wise fashion, but mayincrease more smoothly with increased QP.

The modulation parameter B can be defined according to a variety ofdifferent methods. In certain embodiments, for instance, the modulationparameter B is based on the observation that because blockingdegradation is caused by different quantization in two adjacent blocks,it is most severe across the block boundary and least severe along theboundary. Consequently, and according to certain embodiments, deblockingshould be stronger if its direction is more perpendicular to theboundary. Suppose, for example, that φ is the angle between thedirectional mode m_(I) and the block boundary (refer to FIG. 6).According to one particular implementation, the value of B can then becomputed as follows:B(m _(I))=sin φ  (9)Compared with the H.264/AVC deblocking, the use of one or more of themagnification parameter A and the modulation parameter B provides notonly filter orientation flexibility but also filter thresholdadaptivity.

E. Exemplary Extra Smoothing Filters

In certain embodiments, when the extra smoothing mode is selected, thefiltering can involve pixels that are in a line perpendicular to theblock boundary. For instance, in one particular implementation, extrasmoothing is performed along lines perpendicular to the upper and leftblock boundaries, as shown in block diagram 1600 of FIG. 16. Supposep_(N-1), . . . , p₀, q₀, . . . , q_(N-1) are the pixels in the same rowor column of two adjacent blocks. In one exemplary implementation, thepixel values are modified as follows during the extra smoothing process:

$\begin{matrix}{{p_{n} = {\left( {{\sum\limits_{i = 0}^{i = {n + \frac{N}{2}}}\; p_{i}} + {\sum\limits_{j = 0}^{j = {\frac{N}{2} - n - 1}}\; q_{j}}} \right)/\left( {N + 1} \right)}}{q_{n} = {\left( {{\sum\limits_{i = 0}^{i = {\frac{N}{2} - n - 1}}\; p_{i}} + {\sum\limits_{j = 0}^{j = {n + \frac{N}{2}}}\; q_{j}}} \right)/\left( {N + 1} \right)}}{{0 \leq n \leq {\frac{N}{2} - 1}},{N = \left\{ \begin{matrix}16 & {{for}\mspace{14mu}{luminance}\mspace{14mu}{block}} \\8 & {{for}\mspace{14mu}{chroma}\mspace{14mu}{block}}\end{matrix} \right.}}} & (13)\end{matrix}$FIG. 16 shows an example of Expression (13). For example purposes, thevertical boundary of a luminance block is shown, although the smoothingfilter can be adapted for a horizontal boundary. As shown in FIG. 16,p₇, . . . , p₀, q₀, . . . , q₇ are the pixels to be filtered. FIG. 16further shows particularly the filtering of q₄. Specifically, thefiltered value of q₄ is obtained by averaging p₃, . . . , p₀, q₀, . . ., q₁₂ (shown in brackets 1610, 1612). Expression (13) should not beconstrued as limiting, however, as there exist a variety ofmodifications to the pixel values that can be performed to achieve asmoothing effect. The smoothing performed by expression (13) representsa heavy and long distance smoothing across the block boundary and pixelsin a consecutive non-LDF region. For example, the smoothing filter islong distance in that it is applied to more than three pixels in each ofthe adjacent blocks. For instance, in one exemplary implementation, thefilter is applied to 8 pixels in each of the adjacent blocks when theblocks are 16×16 luminance blocks and 4 pixels in each of the adjacentblocks when the blocks are 8×8 chrominance blocks. Other numbers ofpixels in adjacent blocks can also be filtered by the smoothing filter.Furthermore, in certain embodiments, no boundary strength or filterthresholds are used with the extra smoothing mode.

F. An Exemplary Deblocking Process

FIG. 7 is a flowchart shown an exemplary deblocking process 700. Theillustrated method should not be construed as limiting, however, as anyone or more of the illustrated acts can be performed alone or in variouscombinations and subcombinations with other deblocking processes.

At 710, a reconstructed frame is input (e.g., buffered or loaded into amemory or otherwise received for processing). The reconstructed framecan be input, for example, after a predicted frame is combined with thereconstructed error as part of the motion compensation/estimation loopin an encoder or decoder.

At 712, an initial deblocking filter is applied to the luminance valuesof the video frame. In one particular implementation, the initialdeblocking filter is a standard deblocking filter, such as the H.264/AVCfilter.

At 714, edges in the video frame are detected using orientation energyedge detection (“OEED”). For example, an LDF partition is generatedusing the OEED filters described above with respect to FIG. 8 andExpressions (1) to (5).

At 716, a block of the video frame is selected. The block can beselected in a raster fashion (from left to right starting with the toprow). The block can alternatively be selected in another fashion (e.g.,top-to-bottom wipe or box-out fashion).

At 718, the selected block is evaluated to determine whether edge pixelsare present in the selected block. This determination can be made, forexample, by evaluating the LDF partition, which can mark those blocksthat comprise one or more pixels identified as edge pixels after OEED(e.g., one or more edge pixels that satisfy Expression (5)). If edgepixels are present in the selected block, then the process proceeds at720; otherwise, the process proceeds at 726.

At 720, the selected block is evaluated to determine whether the blockis an 8×8 or 4×4 block and whether the one or more directional featuresin the selected block are consistent with one or more neighboring blocks(e.g., the upper and leftward neighboring blocks). This determinationcan be made, for example, by evaluating the block size and theorientation averages and orientation variances of the selected block aswell as the neighboring blocks (e.g., using expression (6) and (7)). Incertain implementations, the directional features of the selected can befurther evaluated to determine if they are horizontal or vertical. Ifthe directional features of the selected block are consistent with theneighboring blocks and if the selected block is an 8×8 or 4×4 block(and, in certain implementations, if the directional features arenon-vertical and non-horizontal), then the process proceeds with adirectional deblocking scheme at 722; otherwise, the process proceeds at730 with the standard deblocking mode.

At 722, the selected block is evaluated to determine if certaindirectional deblocking thresholds are met. For example, the directionaldeblocking filter thresholds of Expression (10) are evaluated using themodifications to α and β shown in Expressions (11) and (12) and FIG. 15.If the thresholds are satisfied, then a directional deblocking filterhaving the appropriate orientation is applied at 724 (e.g., one of thedirectional deblocking filters shown in FIG. 14). If the thresholds arenot satisfied, then no deblocking filter is applied, and the processproceeds at 734.

Returning to 726, the selected block is evaluated to determine if theblock is a 16×16 block in a consecutive non-LDF region. Thisdetermination can be made, for example, by evaluating the block size andthe intensity variances of the selected block as well as the intensityvariances of one or more neighboring blocks (e.g., the upper andleftward blocks). This evaluation can be made, for example, usingExpression (8). If the selected block is a 16×16 block in a consecutivenon-LDF region, then an extra smoothing filter is applied at 728. Thesmoothing filter can be the smoothing filter of Expression (13). If theselected block is not a 16×16 block in a consecutive non-LDF region,then a standard deblocking filter can be applied at 730.

At 730, the selected block is evaluated to determine whether it meetsthe standard deblocking filter activation thresholds (e.g., thethresholds shown in Expression (10)). If the thresholds are met, then astandard deblocking filter is applied at 732 (e.g., the standardH.264/AVC filter). If the thresholds are not met, then the selectedblock is not filtered with any deblocking filter.

With the selected block having been filtered using either a directionaldeblocking filter, a smoothing filter, or the standard deblocking filteror having not been filtered because of the filter activation thresholdsnot being met, the process continues at 734, where an evaluation is madeto determine if any further blocks in the reconstructed image remain. Ifso, the process returns to 716, where the next block is selected.Otherwise, the process terminates for the video frame.

G. Experimental Results

Experiments were performed using an embodiment of the disclosedtechnology. In particular, experiments were performed using anembodiment of the deblocking scheme shown in FIG. 7 with the 8 OEEDfilters shown in FIG. 8 and described by Expressions (1) to (5), thedeblocking modes being selected by Expressions (6) to (8), thedirectional deblocking filters of FIG. 14 and described by Expression(9) with thresholds determined by Expressions (10) to (12) and FIG. 15,the smoothing filter shown by FIG. 7 and described by Expression (13),and with the H.264/AVC deblocking scheme as the standard deblockingmode. This exemplary embodiment was tested using a variety of sequencesprovided by MPEG/VCEG for HVC (High-performance Video Coding) testing.The videos were coded in an IPPP structure, with 9 or 11 P-framesbetween every two I-frames. The frame rate was set to 10 fps or 12 fps,and a total of 10 seconds were coded within each sequence. The threethresholds T₁, T₂ and T₃ for the deblocking mode decisions were set to2, 3, and 12, respectively.

The results were compared with results from the regular H.264/AVCdeblocking scheme as well as from the intra-predictive deblocking schemedescribed in Jeong. The experiments were only performed on I-frames, butthe quality of inter-prediction for P-frames was similarly improved.

FIG. 17 shows images 1700, 1701 obtained from H.264/AVC deblocking,images 1702, 1703 obtained from intra-predictive deblocking, and images1704, 1705 obtained using the exemplary method. Each image includes LDFregions in an I-frame. It can be observed that artifacts still remainaround the lines in images 1700, 1701 after H.264/AVC deblocking.Furthermore, when compared with the intra-predictive deblocking images1702, 1703, the images 1704, 1705 from the exemplary embodiment showimproved removal of visual artifacts, making the lines clearer andcleaner.

FIG. 18 shows images 1800, 1802, and 1804 of consecutive non-LDF regionstaken from an I-frame. Image 1800 is a block-DCT compressed video framewith no deblocking. As can be seen in image 1800, the block-DCTcompressed video frame is susceptible to severe blocking artifacts inlarge smooth regions. Image 1802 shows the video frame after beingdeblocked with the H.264/AVC deblocking scheme. As seen in image 1802,traditional H.264/AVC deblocking cannot effectively eliminate theseartifacts. Image 1804 is the video frame after being deblocked using theexemplary embodiment. As can be seen in image 1804, deblocking using theexemplary embodiment results in an image that is improved over thedeblocking observed in image 1800 and 1802.

FIG. 19 shows comparison results for different frame types. Inparticular, images 1900 and 1901 show deblocking applied to an I-frameusing the H.264/AVC deblocking technique (image 1900) and the exemplaryembodiment (image 1901). Images 1902 and 1903 show deblocking applied toa second P-frame using the H.264/AVC deblocking technique. Although bothimages 1902 and 1903 are deblocked using the H.264/AVC deblockingtechnique, the P-frame of image 1903 is predicted from the I-frame ofimage 1901, which was deblocked using the exemplary embodiment. Images1904 and 1905 show deblocking applied to a fourth P-frame using theH.264/AVC deblocking technique. Although both images 1904 and 1905 aredeblocked using the H.264/AVC deblocking technique, the P-frame of image1905 is predicted from the I-frame of image 1901, which was deblockedusing the exemplary embodiment. As can be seen in images 1901, 1903, and1905, the blocking artifacts are more effectively reduced not only onthe I-frame but also on the P-frames when using the exemplaryembodiment.

The exemplary embodiments disclosed herein are capable of improving thevisual quality of block-DCT compressed video at low bit-rate, which ishighly demanded in the next generation of video coding standards.Because the blocking artifacts are effectively removed using theexemplary embodiment, the objective quality of the image is typicallyimproved. Some peak signal-to-noise ratio results for the exemplaryembodiment are shown in table 2000 of FIG. 20. Table 2000 also shows theaverage percentage of “mode B” (which corresponds to the extra smoothingmode) and “mode C” (which corresponds to directional deblocking with thedirectional deblocking filters of FIG. 14 and described by Expression(9) and with thresholds determined by Expressions (10) to (12) and FIG.15) selected during deblocking of the tested I-frames.

Having illustrated and described the principles of the illustratedembodiments, it will be apparent to those skilled in the art that theembodiments can be modified in arrangement and detail without departingfrom such principles. For example, the disclosed deblocking techniquesare not limited to in-loop deblocking, but can also be used to performpost-processing deblocking in certain implementations.

In view of the many possible embodiments to which the principles of thedisclosed invention may be applied, it should be recognized that theillustrated embodiments are only preferred examples of the invention andshould not be taken as limiting the scope of the invention. Rather, thescope of the invention is defined by the following claims and theirequivalents. We therefore claim as our invention all that comes withinthe scope and spirit of these claims and their equivalents.

The invention claimed is:
 1. A method for reducing block artifactsduring video encoding or decoding, comprising: buffering a video framereconstructed during block-based motion-predictive encoding or decoding;for a selected block in the video frame, determining whether theselected block is in a region of two or more blocks with no localdirectional features by comparing to a threshold value, a sum of (a) asingle block-wide metric for the selected block indicating intensityvariations between all pixels of the selected block; (b) a separatesingle block-wide metric for a first adjacent block indicating intensityvariations between all pixels within the first adjacent block; and (c) aseparate single block-wide metric for a second adjacent block indicatingintensity variations between all pixels within the second adjacentblock, in order to perform the determining of whether the selected blockis in the region of two or more blocks with no local directionalfeatures; selecting one of a plurality of filters to apply to theselected block based at least in part on the determination of whetherthe selected block is in a region with no local directional features;and applying the selected filter to the selected block.
 2. The method ofclaim 1, wherein the region with no local directional features comprisesthe selected block and one or more adjacent blocks to the selectedblock.
 3. The method of claim 1, wherein the selecting comprisesselecting a smoothing filter when the selected block is determined to bein a region with no local directional features.
 4. The method of claim1, wherein the determining whether the selected block is in a regionwith no local directional features further comprises partitioning thedecoded image into blocks having local directional features and blockshaving no local directional features using an edge detection filter anddetermining that the selected block has no local directional featuresbased at least in part on the partitioning.
 5. The method of claim 1,wherein the method is performed in a motion estimation/compensation loopof an encoder or in a motion estimation loop of a decoder.
 6. One ormore computer-readable memory or storage devices storingcomputer-executable instructions which when executed by a computer causethe computer to perform a video encoding or video decoding method, themethod comprising: buffering a video frame reconstructed duringblock-based motion-predictive encoding or decoding; for a selected blockin the video frame, determining whether the selected block is in aregion of two or more blocks with no local directional features bycomparing to a threshold value, a sum of (a) a single block-wide metricfor the selected block indicating intensity variations between allpixels of the selected block; (b) a separate single block-wide metricfor a first adjacent block indicating intensity variations between allpixels within the first adjacent block; and (c) a separate singleblock-wide metric for a second adjacent block indicating intensityvariations between all pixels within the second adjacent block, in orderto perform the determining of whether the selected block is in theregion of two or more blocks with no local directional features;selecting one of a plurality of filters to apply to the selected blockbased at least in part on the determination of whether the selectedblock is in a region with no local directional features; and applyingthe selected filter to the selected block.
 7. The one or morecomputer-readable memory or storage devices of claim 6, wherein theregion with no local directional features comprises the selected blockand one or more adjacent blocks to the selected block.
 8. The one ormore computer-readable memory or storage devices of claim 6, wherein theselecting comprises selecting a smoothing filter when the selected blockis determined to be in a region with no local directional features. 9.The one or more computer-readable memory or storage devices of claim 6,wherein the determining whether the selected block is in a region withno local directional features further comprises partitioning the decodedimage into blocks having local directional features and blocks having nolocal directional features using an edge detection filter anddetermining that the selected block has no local directional featuresbased at least in part on the partitioning.
 10. The one or morecomputer-readable memory or storage devices of claim 6, wherein themethod is performed in a motion estimation/compensation loop of anencoder or in a motion estimation loop of a decoder.
 11. A system,comprising: a processor; and one or more computer-readable memory orstorage devices storing computer-executable instructions which whenexecuted by the processor cause the processor to perform a method, themethod comprising: buffering a video frame reconstructed duringblock-based motion-predictive encoding or decoding; for a selected blockin the video frame, determining whether the selected block is in aregion of two or more blocks with no local directional features bycomparing to a threshold value, a sum of (a) a single block-wide metricfor the selected block indicating intensity variations between allpixels of the selected block; (b) a separate single block-wide metricfor a first adjacent block indicating intensity variations between allpixels within the first adjacent block; and (c) a separate singleblock-wide metric for a second adjacent block indicating intensityvariations between all pixels within the second adjacent block, in orderto perform the determining of whether the selected block is in theregion of two or more blocks with no local directional features;selecting one of a plurality of filters to apply to the selected blockbased at least in part on the determination of whether the selectedblock is in a region with no local directional features; and applyingthe selected filter to the selected block.
 12. The system of claim 11,wherein the region with no local directional features comprises theselected block and one or more adjacent blocks to the selected block.13. The system of claim 11, wherein the selecting comprises selecting asmoothing filter when the selected block is determined to be in a regionwith no local directional features.
 14. The system of claim 11, whereinthe determining whether the selected block is in a region with no localdirectional features further comprises partitioning the decoded imageinto blocks having local directional features and blocks having no localdirectional features using an edge detection filter and determining thatthe selected block has no local directional features based at least inpart on the partitioning.
 15. The system of claim 11, wherein the methodis performed in a motion estimation/compensation loop of an encoder orin a motion estimation loop of a decoder.